package com.dao.impl.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.modelo.Modelo;

public class ModeloMapper implements RowMapper{

	@Override
	public Object mapRow(ResultSet rs, int num_rows) throws SQLException {
		Modelo modelo = new Modelo();
		try{
			modelo.setId(rs.getInt(1));
			modelo.setNombre(rs.getString(2));
			modelo.setId_marca(rs.getInt(3));
		}catch(Exception e){
			System.out.println("ModeloMapper Errror: "+e.getMessage());
		}
		return modelo;
	}
	
}
